package com.xj.demo.classcommand;

public class MethodInvokeTest {
    private void invokeVirtual(){
        Object obj = new Object();
        obj.toString();
        Integer num = 10;
        int compare = num.compareTo(15);
    }
    public void invokeInterface(){
        Foo foo = new Bar();
        foo.abstractMethod();
    }
    public void invokeSpecial(){
        Object obj = new Object();
        super.toString();
        privateMethod();
    }
    public void invokeStatic(){
        Foo.staticMethod();
    }

    private void privateMethod(){}
}

interface Foo{
    public static void staticMethod(){}
    void abstractMethod();
}
class Bar implements Foo{

    public void abstractMethod(){}
}